id: task-59 title: Simplify init command with modern CLI status: Done assignee:
- '@codex' created_date: '2025-06-14' updated_date: '2025-06-14' labels:
- cli dependencies: []
Description
Simplify the backlog init command by removing the TUI wizard and replacing it with a plain CLI questionnaire similar to modern tools like vue-cli. The agent instruction file selection should use checkboxes rendered directly in the terminal. Users can navigate with arrow keys, toggle selections with
Acceptance Criteria
- [x]
backlog initprompts for project and reporter names using standard text prompts - [x] Agent selection presents checkboxes and instructions on how to select
- [x] Implementation relies on a lightweight prompt library (e.g.
prompts) - [x] No
blessedTUI is used during init - [x] Tests and lint pass
Implementation Notes
The backlog init command has been successfully simplified from a blessed-based TUI wizard to a modern CLI questionnaire:
Key Changes:
- Text prompts: Replaced TUI input fields with standard
promptText()calls using readline for project name and reporter name collection - Agent selection: Implemented checkbox-based selection using the
promptslibrary withmultiselecttype, providing arrow key navigation, space bar toggling, and enter to confirm - User experience: Added helpful hint text ("- Space to select ยท Enter to confirm") to guide users through the selection process
- Dependency management: Leveraged existing
promptsdependency, avoiding need for additional libraries
Current Implementation (src/cli.ts:44-122):
- Git repository check with y/N prompt for initialization if needed
- Project name prompt using
promptText() - Reporter name prompt with optional global storage
- Agent instruction file selection using
prompts.multiselect()with checkboxes - Backlog initialization and file creation
Test Coverage: All existing CLI integration tests continue to pass, including specific init command tests that verify:
- Project initialization in existing git repos
- Directory structure creation
- Agent instruction file generation
- Git commit automation
The implementation meets all acceptance criteria while maintaining backward compatibility and test coverage.